<template>
<div>
  <div id="slider" class="mui-slider">
				<div id="sliderSegmentedControl" class="mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
					<div class="mui-scroll">
						<a class="mui-control-item mui-active"  data-wid="tab-top-subpage-1.html" href="#all">
							全部
						</a>
						<a class="mui-control-item"  data-wid="tab-top-subpage-2.html" href="#life">
							生活
						</a>
						<a class="mui-control-item" data-wid="tab-top-subpage-3.html" href="#sy">
							摄影设计
						</a>
						<a class="mui-control-item"  data-wid="tab-top-subpage-4.html" href="#start">
							明星美女
						</a>
						<a class="mui-control-item"  data-wid="tab-top-subpage-4.html" href="#start">
							科技
						</a>
						
					</div>
				</div>
					
	</div>
	<div class="main">
		<ul>
			<router-link v-for="item in images" :key="item.id" :to='"shareImg/"+item.id' tag="li">
				<img v-lazy="item.url"  alt="">
				<p>
					<span>{{item.title}}</span><br>
					<span>{{item.info}}</span>
				</p>
			</router-link>
		</ul>
	</div>
</div>
	
</template>

<script>
export default {
	data(){
		return {
			images:""
		}
	},
    mounted() {
        mui('.mui-scroll-wrapper').scroll({
	deceleration: 0.0005 //flick 减速系数，系数越大，滚动速度越慢，滚动距离越小，默认值0.0006
		});
			},
	methods:{
		getPic(){
			this.$http.get("http://images.com").then(result=> {
				this.images = result.body;
				this.images = this.images.filter(item=> {
					return item.title =="redian"
				})
				this.images =this.images[0].data;
			
			})
		}
	},
	created() {
		this.getPic()
	},
}
</script>
<style scoped>

 *{
     touch-action: pan-y
 }
 .main{
	 background: #eee
 }
 .main img{
	 width: 100%
}
ul{
	margin:0;
	padding: 0;
	list-style: none;
}
.main li{
	margin-bottom: 10px;
	position: relative;
}
image[lazy=loading] {
  width: 40px;
  height: 300px;
  margin: auto;
}
li p{
	margin: 0;
	padding: 0;
	position: absolute;
	bottom: 0;
	left: 0;
	background: rgba(0,0,0,0.5);
	width: 100%;
		
	}
</style>